import 'package:flutter/widgets.dart';

import 'package:flutter/material.dart';

import 'package:dropdown_menu/_src/dropdown_header.dart';

Widget buildCheckItem(BuildContext context, dynamic data, bool selected) {
  return Container(
    color: Colors.white,
    padding: new EdgeInsets.all(10.0),
    child: new Row(
      children: <Widget>[
        new Text(
          defaultGetItemLabel(data),
          style: selected
              ? new TextStyle(
                  fontSize: 14.0,
                  color: Theme.of(context).primaryColor,
                  fontWeight: FontWeight.w400)
              : new TextStyle(fontSize: 14.0),
        ),
        new Expanded(
          child: new Align(
            alignment: Alignment.centerRight,
            child: selected
                ? new Icon(
                    Icons.check,
                    color: Theme.of(context).primaryColor,
                  )
                : null,
          ),
        ),
      ],
    ),
  );
}

Widget buildCustomItem(BuildContext context, dynamic data, bool selected) {
  return Container(
    height: 26,
    decoration: BoxDecoration(
      borderRadius: BorderRadius.all(Radius.circular(4)),
      border: Border.all(
          color: selected ? Theme.of(context).primaryColor : Color(0xffcccccc)),
    ),
    child: Container(
      child: Center(
        child: Text(
          defaultGetItemLabel(data),
          style: selected
              ? TextStyle(
                  fontSize: 12,
                  color: Theme.of(context).primaryColor,
                  fontWeight: FontWeight.w400)
              : TextStyle(
                  fontSize: 12,
                  color: Color(0xff333333),
                  fontWeight: FontWeight.w400),
        ),
      ),
    ),
  );
}
